from builtins import AssertionError
from log.log import Log
from configparser import NoSectionError
import requests
log=Log()
class asert:
    """断言自定义报错"""
    def __init__(self,ex,ac):
        self.ex=ex
        self.ac=ac
        log.log.info("断言失败，期望值:{},实际值:{}".format(self.ex,self.ac))
    def __str__(self):
        return "期望值:{},实际值:{}".format(self.ex,self.ac)
class http(AssertionError):
    def __str__(self):
        return "请检查链接是否带有http://"
class url_erro(BaseException):
    def __str__(self):
        return "config.ini中是否存在url地址"
class  db_error(Exception):
    def __str__(self):
        return "DB备份/还原操作失败,检查是否存在:mcrtestenv.sql"
